package com.sky.mapper;

import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author zhangyu
 * @data 2023/4/20 14:59
 */
@Mapper
public interface SetmealDishMapper {
    List<Long> setmealIds(@Param("ids") List<Long> ids);
    /**
     * 向套餐菜品对应表插入数据
     */
    void addSetMealDish(@Param("list")List<SetmealDish> list);
    /**
     * 根据套餐id删除包含的菜品
     */
    @Delete("delete from setmeal_dish where setmeal_id=#{id}")
    void deleteDishInforMatonBySetMealId(@Param("id") Long id);
}
